home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Gold Collection
/
Software Vault - The Gold Collection (American Databankers) (1993).ISO
/
cdr48
/
vdl020d.zip
/
VWINHIGH.DOC
< prev
next >
Wrap
Text File
|
1993-04-14
|
95KB
|
3,476 lines
{
════════════════════════════════════════════════════════════════════════════
Visionix Win/User Interface High-Level Unit (VUIHIGH)
Copyright 1991,1992 Visionix
ALL RIGHTS RESERVED
────────────────────────────────────────────────────────────────────────────
Revision history in reverse chronological order:
Initials Date Comment
-------- -------- ------------------------------------------------------
jrt 03/17/93 Merged beta015 with beta015doc to create beta016
(added in WDrawMenuB)
lpg 03/15/93 Added Source Documentation
lpg 03/06/93 Fixed bugs with WFormTxtMask (improper j/i index when
no data entered, LJust ) and (trapped in loop on no
S data). Turned on Events. Still need to add Event
for LFArr on j1 and RTArr on End.
mep 02/11/93 Cleaned up code for beta release
Fixed for DPMI mode.
jrt 02/08/93 Sync with beta 0.12 release
jrt 02/01/93 Mods to support screen sizes other than 80x25
jrt 12/07/92 Sync with beta 0.11 release
jrt 11/21/92 Sync with beta 0.08
jrt 11/21/92 Zapped WMenu routine changes that supported noactive
items. Integrated with jr copy of VWINHIGH that
included code for WinEnv.SaveScreen handling and
font restoration; plus new code for control panel.
lpg 11/19/92 Added function : WVertLine
lpg 10/18/92 Modified WMenu Routines to support NonActive Items.
Added New Fuunctions:
AddMenuItem,MenuItemOff
Should Clean up and Standardize all Menu Functions!
lpg 10/08/92 Modified WReadTxtMask to Support Justified Entry
Added New Functions:
WWriteDate,WReadDate
lpg 10/05/92 Added New Functions:
WWriteTxtMask,WWriteNumMask,WWriteFloat,AddMask,
WReadTxtmask,WReadNumMask,WReadFloat,DelMask
jrt 09/01/92 First logged revision.
════════════════════════════════════════════════════════════════════════════
}
Unit VWinHigh;
Uses
VTypes,
VGen,
VFont,
VMulti,
VMem,
VIn,
VCRT,
VWinlow,
VDates,
Dos;
Const
{-----------------------}
IfcSignature = $0F0F0; {*** do not change!! ***}
IfcSignature2 = $0E0E0; {*** do not change!! ***}
{-----------------------}
Type
PopupProc = Procedure;
WIfcPtr = ^WIfcRecord;
WIfcRecord = Record
NamePtr : ^STRING;
Version : WORD; {---------------------}
CmdEntryPtr : PopupProc; { Do not change order }
PrevIfc : WIfcPtr; {---------------------}
NextIfc : WIfcPtr;
CSDataPtr : POINTER;
UserData : POINTER;
END;
{------------------------------------}
{ Procedure and function definitions }
{------------------------------------}
Function WReadKey : CHAR;
Procedure WDrawMenu( Menu : PMenuMax;
NumChoices : INTEGER;
Cols : INTEGER;
Rows : INTEGER;
Keys : ST80 );
Procedure WMenu( Menu : PMenuMax;
NumChoices : INTEGER;
Cols : INTEGER;
Rows : INTEGER;
Keys : ST80;
var Choice : INTEGER );
Procedure WDrawMenuB( Menu : PMenuMax;
NumChoices : INTEGER;
Cols : INTEGER;
Rows : INTEGER;
Keys : ST80;
FrameStart : INTEGER;
Choice : integer );
Procedure WMenuB( Menu : PMenuMax;
NumChoices : INTEGER;
Cols : INTEGER;
Rows : INTEGER;
Keys : ST80;
var FrameStart : INTEGER;
var Choice : INTEGER );
Procedure WWriteTxt( MaxLen : INTEGER;
FC : BYTE;
BC : BYTE;
Txt : ST80 );
Procedure WWriteNum( MaxLen : INTEGER;
FC : BYTE;
BC : BYTE;
Num : LONGINT );
Procedure WWriteHex( Len : BYTE;
FC : INTEGER;
BC : INTEGER;
Num : LONGINT );
Procedure WWriteTxtMask( Mask : STRING;
Fill : CHAR;
LJust : BOOLEAN;
FC : INTEGER;
BC : INTEGER;
Txt : STRING );
Procedure WWriteNumMask( Mask : STRING;
FC : INTEGER;
BC : INTEGER;
Num : LONGINT );
Procedure WWriteFloat( Float : REAL;
Width : INTEGER;
Decimal : INTEGER;
FC : INTEGER;
BC : INTEGER );
Procedure WWriteDateMask( FC : INTEGER;
BC : INTEGER;
Date : LONGINT );
Function WReadTxt( MaxLen : INTEGER;
FC : BYTE;
BC : BYTE;
InText : STRING ) : STRING;
Function WReadNum( MaxLen : INTEGER;
FC : BYTE;
BC : BYTE;
InNum : LONGINT ) : LONGINT;
Procedure WWriteOpt( CurOpt : integer;
thelist : PMenuMax;
fc : byte;
bc : BYTE );
Procedure WReadOpt( var CurOpt : INTEGER;
var TheList;
NumOpts : INTEGER;
FC : BYTE;
BC : BYTE );
Function WReadHex( Bites : INTEGER;
FC : INTEGER;
BC : INTEGER;
InHex : LONGINT ) : LONGINT;
Function WReadTxtMask( Mask : STRING;
Keys : STRING;
Fill : CHAR;
LJust : BOOLEAN;
FC : INTEGER;
BC : INTEGER;
InText : STRING ) : STRING;
Function WReadNumMask( Mask : STRING;
FC : INTEGER;
BC : INTEGER;
InNum : LONGINT ) : LONGINT;
Function WReadFloat( Width : INTEGER;
Decimal : INTEGER;
FC : INTEGER;
BC : INTEGER;
InFloat : REAL ) : REAL;
Function WReadDateMask( FC : INTEGER;
BC : INTEGER;
InDate : LONGINT ) : LONGINT;
Function WGemDialogBox( S : STRING ) : INTEGER;
Procedure WCWrite( S : ST80 );
Procedure WCWriteLn( S : ST80 );
Procedure WLineMsg( S : STRING;
FC : BYTE;
BC : BYTE;
Y : BYTE;
var B : TButtonList4;
var Count : BYTE );
Procedure WPrgNameMsg( S : STRING;
FC : BYTE;
BC : BYTE );
Procedure WMessage( S : STRING;
FC : BYTE;
BC : BYTE );
Procedure WInfoMsg( S : STRING;
FC : BYTE;
BC : BYTE );
Procedure WPrompt( S : ST80;
FC : BYTE;
BC : BYTE );
Procedure WGemMsgBox( S : STRING );
Procedure WClose;
Procedure WHelpKeyProc( Status : BYTE;
Key1 : CHAR;
Key2 : CHAR );
Procedure WControlKeyProc( Status : BYTE;
Key1 : CHAR;
Key2 : CHAR );
Function WAutoMenu( Menu : PMenuMax;
NumChoices : INTEGER;
Cols : INTEGER;
Rows : INTEGER;
Keys : ST80;
X : INTEGER;
Y : INTEGER;
FC : INTEGER;
BC : INTEGER;
BoxFC : INTEGER;
BoxBC : INTEGER;
Name : ST80;
var FrameStart : WORD ) : INTEGER;
Function WAutoMenu_Kill( Menu : PMenuMax;
NumChoices : INTEGER;
Cols : INTEGER;
Rows : INTEGER;
Keys : ST80;
X : INTEGER;
Y : INTEGER;
FC : INTEGER;
BC : INTEGER;
BoxFC : INTEGER;
BoxBC : INTEGER;
Name : ST80;
var FrameStart : WORD ) : INTEGER;
Procedure WView( P : Pointer;
BufWid : INTEGER;
BufLen : INTEGER;
Wid : INTEGER;
Len : INTEGER );
Procedure WDrawButton( Btype : INTEGER;
X : INTEGER;
Y : INTEGER;
FC : INTEGER;
BC : INTEGER;
Text : STRING );
Procedure WBlinkButton( BType : BYTE;
X : BYTE;
Y : BYTE;
FC1 : BYTE;
BC1 : BYTE;
FC2 : BYTE;
BC2 : BYTE;
Delay1 : WORD;
Delay2 : WORD;
BlinkCount : BYTE;
S : ST80 );
Procedure WDrawButtonList( BList : PButtonList;
Count : BYTE );
Procedure WMakeBRec( var BRec : TButton;
BType : BYTE;
X : BYTE;
Y : BYTE;
FC : INTEGER;
BC : INTEGER;
Text : STRING );
Procedure WDrawIcon( DType : BYTE;
X : BYTE;
Y : BYTE;
FC : INTEGER;
BC : INTEGER );
Function WDoDialogBox( X : BYTE;
Y : BYTE;
WB : BYTE;
ICF : BYTE;
TF : BYTE;
NBF : BYTE;
NBB : BYTE;
HBF : BYTE;
HBB : BYTE;
BType : BYTE;
HBType : BYTE;
Txt : STRING ) : INTEGER;
Function WGetIconWidth( DType : BYTE ) : BYTE;
Function WSR( Master : STRING;
LookFor : STRING;
ReplaceWith : STRING ) : STRING;
Procedure WSubmitHelpProc( Proc : POINTER );
Procedure WSubmitDefKeys;
Procedure WBarAmountDone( Todo : LONGINT;
Done : LONGINT;
ChA : CHAR;
ChB : CHAR;
DoneFC : BYTE;
DoneBC : BYTE;
NotDoneFC : BYTE;
NotDoneBC : BYTE;
BarW : BYTE );
Function WGetLastOPROTsrPtr : Pointer;
Procedure WWRiteXBoxRadioB( X : INTEGER;
Y : INTEGER;
FC : INTEGER;
BC : INTEGER;
CurSetting : BOOLEAN;
ZType : BYTE );
Function WReadXBox( X : INTEGER;
Y : INTEGER;
FC : INTEGER;
BC : INTEGER;
CurSetting : BOOLEAN ) : BOOLEAN;
Function WReadRadioB( X : INTEGER;
Y : INTEGER;
FC : INTEGER;
BC : INTEGER;
CurSetting : BOOLEAN ) : BOOLEAN;
Procedure WTurnHelpOnOff( TurnHelpOn : BOOLEAN );
(*
Procedure WSubmitKeyProc( Key1 : CHAR;
Key2 : CHAR;
P : POINTER;
Name : STRING );
Procedure WRemoveKeyProc( Name : STRING );
*)
Procedure WHorizLine( Y : INTEGER;
LType : INTEGER );
Procedure WVertLine( X : INTEGER;
LType : INTEGER );
Procedure WOldHelp;
{------------------------------}
{ Begin implementation of code }
{------------------------------}
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Procedure WTopLeftKeyProc( Status : BYTE;
Key1 : CHAR;
Key2 : CHAR ); Far;
[PARAMETERS]
Status
Key1
Key2
[RETURNS]
(None)
[DESCRIPTION]
****** THIS FUNCTION NOT IMPLEMENTED! ******
[SEE-ALSO]
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Function WReadKey : CHAR;
[PARAMETERS]
(None)
[RETURNS]
Character Read from any Input
[DESCRIPTION]
This function Reads the First Character in the Window-Lib's Keyboard
Buffer. This Buffer is filled from any user input (Keyboard, Mouse, etc).
If nothing is in the Buffer, it waits for something before continuing.
This is basically like a Std Pascal "ReadKey" except that the source is
the Buffer.
Pre-Padding this buffer with Keystrokes or Mouse Entries allows the program
to continue automatically as if the User entered the data himself. This
feature can be very useful to automate or quickly get around the Window's
System and Application.
[SEE-ALSO]
[EXAMPLE]
VAR
ch : CHAR;
BEGIN
WriteLn( 'Enter any Keystroke / Mouse Button' );
WriteLn( 'Press ESC to Quit.' );
WriteLn;
REPEAT
ch := WReadKey;
WriteLn( 'ch = ',ByteToHex(Ord(ch)),'h ''Ord(ch):3,'d = ',ch );
UNTIL ch = #27;
END;
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Procedure WClose;
[PARAMETERS]
(None)
[RETURNS]
(None)
[DESCRIPTION]
This closes all Existing Windows and Shuts Down the Window System.
The Program is now Ready to Exit Cleanly.
[SEE-ALSO]
WOpen
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
[PARAMETERS]
[RETURNS]
[DESCRIPTION]
[SEE-ALSO]
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Procedure WDrawMenu( Menu : PMenuMax;
NumChoices : INTEGER;
Cols : INTEGER;
Rows : INTEGER;
Keys : ST80 );
[PARAMETERS]
Menu Pointer to Menu Data
NumChoices Number of Items in Menu
Cols Number of Columns to display Menu with
Rows Number of Rows to display Menu with
Keys Hot-Key list, if any (1st char=1st item,2nd char=2nd item,...)
[RETURNS]
(None)
[DESCRIPTION]
Takes all the information provided and displays the menu as it would
look described by the input information. This routine Requires that
it's display output window already Exists, as it will not Create one.
[SEE-ALSO]
WDrawMenu
WMenu
WMenuB
WAutoMenu
WAutoMenu_Kill
WView
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Procedure WMenu( Menu : PMenuMax;
NumChoices : INTEGER;
Cols : INTEGER;
Rows : INTEGER;
Keys : ST80;
var Choice : INTEGER );
[PARAMETERS]
Menu Pointer to Menu Data
NumChoices Number of Items in Menu
Cols Number of Columns to display Menu with
Rows Number of Rows to display Menu with
Keys Hot-Key list, if any (1st char=1st item,2nd char=2nd item,...)
Choice VAR Returned Selected Menu Item
[RETURNS]
(None)
[DESCRIPTION]
Creates and displays Menu based upon the provided information. Allows
the user to then scroll thru the Menu until a selection is made or
ESC is pressed. If ESC pressed then Choice returns as -1 otherwise
Choice number represents the selected Item in the Menu List.
This Procedure is a Low-Level Menu routine and is generally used as
a tool in building more powerful Menuing routines. This routine Requires
that it's display output window already Exists, as it will not Create
one.
[SEE-ALSO]
WDrawMenu
WMenu
WMenuB
WAutoMenu
WAutoMenu_Kill
WView
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Procedure WDrawMenuB( Menu : PMenuMax;
NumChoices : INTEGER;
Cols : INTEGER;
Rows : INTEGER;
Keys : ST80;
FrameStart : INTEGER;
Choice : integer );
[PARAMETERS]
Menu Pointer to Menu Data
NumChoices Number of Items in Menu
Cols Number of Columns to display Menu with
Rows Number of Rows to display Menu with
Keys Hot-Key list, if any (1st char=1st item,2nd char=2nd item,...)
FrameStart Start of the displayed frame within the scrollable menu
Choice Currently select menu item
[RETURNS]
(None)
[DESCRIPTION]
Takes all the information provided and displays the menu as it would
look described by the input information. This routine Requires that
it's display output window already Exists, as it will not Create one.
[SEE-ALSO]
WDrawMenu
WMenu
WMenuB
WAutoMenu
WAutoMenu_Kill
WView
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Procedure WMenuB( Menu : PMenuMax;
NumChoices : INTEGER;
Cols : INTEGER;
Rows : INTEGER;
Keys : ST80;
var FrameStart : INTEGER;
var Choice : INTEGER );
[PARAMETERS]
Menu Pointer to Menu Data
NumChoices Number of Items in Menu
Cols Number of Colums to display Menu with
Rows Number of Rows to display Menu with
Keys Hot-Key list, if any (1st char=1st item, 2nd char=2nd item,...)
FrameStart VAR Item Number of 1st item visible in Menu Scrolling window
Choice VAR Returned Selected Menu Item
[RETURNS]
(None)
[DESCRIPTION]
Creates and displays Menu based upon the provided information with
the FrameStart Item being the top Item in the Scrolling Menu. Allows
the user to then scroll thru the Menu until a selection is made or ESC
is pressed. If ESC is pressed, then Choice returns as -1 otherwise
Choice number represents the current selected Item in the Menu List.
This Procedure is a Low-Level Menu routine and is generally used as a
tool in building more powerful Menuing routines. Primary advantage is
that it allows for jumping into and out of the Menu with a new Menu
Starting position. This routine Requires that it's display output
window already Exists, as it will not Create one.
[SEE-ALSO]
WDrawMenu
WMenu
WMenuB
WAutoMenu
WAutoMenu_Kill
WView
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Function WAutoMenu( Menu : PMenuMax;
NumChoices : INTEGER;
Cols : INTEGER;
Rows : INTEGER;
Keys : ST80;
X : INTEGER;
Y : INTEGER;
FC : INTEGER;
BC : INTEGER;
BoxFC : INTEGER;
BoxBC : INTEGER;
Name : ST80;
var FrameStart : WORD ) : INTEGER;
[PARAMETERS]
Menu Pointer to Menu Data
NumChoices Number of Items in Menu
Cols Number of Colums to display Menu with
Rows Number of Rows to display Menu with
Keys Hot-Key list, if any (1st char=1st item, 2nd char=2nd item,...)
X Left Screen Coordinate for Menu Window
Y Upper Screen Coordinate for Menu Window
FC Foreground Color for Menu Window
BC Background Color for Menu Window
BoxFC Foreground Color for Menu Window Border Box
BoxBC Background Color for Menu Window Border Box
Name Menu Window Name
FrameStart VAR Item Number of 1st item visible in Menu Scrolling window
[RETURNS]
Index Number of Selected Menu Item
[DESCRIPTION]
Creates and displays a Window and Menu using the provided Window
attributes and position. The Top Item in the Scrolling Menu Window.
Allows the user to then Scroll thru the Menu until a selection is made
or ESC is pressed. If ESC is pressed, then the function returns -1,
otherwise the function returns the number representing the current
selected Item in the Menu List. This Procedure is a High-Level Menu
Routine that takes care of handling the Window, Sizing, User Selection,
and Returning that result to the caller. After a User selection has
been made, this routine does NOT remove the Menu Window, but requires
the caller to remove it when he is through with this Menu Window. This
allows the Programmer to created Layered or Cascading Menus representing
the chain of the User's Selections. Removal of the Menu Window is done
by calling WDispose() and proving the Menu Window Name.
[SEE-ALSO]
WDrawMenu
WMenu
WMenuB
WAutoMenu
WAutoMenu_Kill
WView
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Function WAutoMenu_Kill( Menu : PMenuMax;
NumChoices : INTEGER;
Cols : INTEGER;
Rows : INTEGER;
Keys : ST80;
X : INTEGER;
Y : INTEGER;
FC : INTEGER;
BC : INTEGER;
BoxFC : INTEGER;
BoxBC : INTEGER;
Name : ST80;
var FrameStart : WORD ) : INTEGER;
[PARAMETERS]
Menu Pointer to Menu Data
NumChoices Number of Items in Menu
Cols Number of Colums to display Menu with
Rows Number of Rows to display Menu with
Keys Hot-Key list, if any (1st char=1st item, 2nd char=2nd item,...)
X Left Screen Coordinate for Menu Window
Y Upper Screen Coordinate for Menu Window
FC Foreground Color for Menu Window
BC Background Color for Menu Window
BoxFC Foreground Color for Menu Window Border Box
BoxBC Background Color for Menu Window Border Box
Name Menu Window Name
FrameStart VAR Item Number of 1st item visible in Menu Scrolling window
[RETURNS]
Index Number of Selected Menu Item
[DESCRIPTION]
Creates and displays a Window and Menu using the provided Window
attributes and position. The Top Item in the Scrolling Menu Window.
Allows the user to then Scroll thru the Menu until a selection is made
or ESC is pressed. If ESC is pressed, then the function returns -1,
otherwise the function returns the number representing the current
selected Item in the Menu List. This Procedure is a High-Level Menu
Routine that takes care of handling the Window, Sizing, User Selection,
and Returning that result to the caller. After a User selection has
been made, this routine removes the Menu Window it created and returns
the display to what it was prior to the call.
[SEE-ALSO]
WDrawMenu
WMenu
WMenuB
WAutoMenu
WAutoMenu_Kill
WView
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Procedure WDrawIcon( DType : BYTE;
X : BYTE;
Y : BYTE;
FC : INTEGER;
BC : INTEGER );
[PARAMETERS]
DType Icon Type Number
X X Window Coordinate
Y Y Window Coordinate
FC Foreground Icon Color
BC Background Icon Color
[RETURNS]
(None)
[DESCRIPTION]
This routine Displays and Icon based upon the provided Icon Information.
Icon Types are as follows:
Icon #1 = " █ " Icon #2 = " ▄▀▀▀▄ "
" █ " " ▄▀ "
" █ " " █ "
" ▄ " " ▄ "
" ▀ " " "
Icon #3 = " ▄▄ Icon #4 = " ▄▄▄ "
" ▄▀ ▀▄ " " ▄▀ ▀▄ "
" █ STOP █ " " █ RIP █ "
" ▀▄ ▄▀ " " █ █ "
" ▀▀▀▀ " " ▀ ▀ "
Icon #5 = " ─────── " Icon #6 = " "
" ▀▀▀▀▀▀▀ " " Visionix "
" ███████ " " ░░▒▒▒▓▓▓ "
" C D P " " "
" " " "
[SEE-ALSO]
WGemDialogBox
WGemMsgBox
WDrawIcon
WDoDialogBox
WGetIconWidth
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Function WGetIconWidth( DType : BYTE ) : BYTE;
[PARAMETERS]
DType Icon Type Number
[RETURNS]
Width of that Icon Type
[DESCRIPTION]
This function Returns the character width of the selected Icon Type.
[SEE-ALSO]
WGemDialogBox
WGemMsgBox
WDrawIcon
WDoDialogBox
WGetIconWidth
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Function WSR( Master : STRING;
LookFor : STRING;
ReplaceWith : STRING ) : STRING;
[PARAMETERS]
Master Source String to Modify
LookFor Sub-String to Look For
ReplaceWith Sub-String to Replace with Found Sub-String
[RETURNS]
Modified Source String
[DESCRIPTION]
This routine searches for all instance of the LookFor Sub-String in the
Master String and replaces them with the ReplaceWith Sub-Strings.
Returns this modified String result.
[SEE-ALSO]
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Function WDoDialogBox( X : BYTE;
Y : BYTE;
WB : BYTE;
ICF : BYTE;
TF : BYTE;
NBF : BYTE;
NBB : BYTE;
HBF : BYTE;
HBB : BYTE;
BType : BYTE;
HBType : BYTE;
Txt : STRING ) : INTEGER;
[PARAMETERS]
X X Screen Coordinate
Y Y Screen Coordinate
WB Dialog Window Background Color
ICF Icon Foreground Color
TF Dialog Text Foreground Color
NBF Normal Button Foreground Color
NBB Normal Button Background Color
HBF Highlighted Button Foreground Color
HBB Highlighted Button Background Color
BType Normal Button Type Number
HBType Highlighted Button Type Number
Txt Button Text
[RETURNS]
The User-Selected Dialog Button number
[DESCRIPTION]
This is a Low-Level Dialog Box Routine which simply takes all the
provided Dialog Data, creates a Dialog Box, and returns the User
Selected Button Number. Here each parameter is expressed in great
detail describing exactly how the Dialog Box should look, it's
position, the Button Types, and the Dialog Text itself. This is all
processed at this level as well as the Handling of the User input to
return the User's Button Selection.
[SEE-ALSO]
WGemDialogBox
WGemMsgBox
WDrawIcon
WDoDialogBox
WGetIconWidth
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Procedure WSubmitDefKeys;
[PARAMETERS]
(None)
[RETURNS]
(None)
[DESCRIPTION]
Submits the Default Windows Keys to the Multi-Tasker. These are
F1 to Help Functions, F9 for the Control Panel, F7 is commonly
used as a DOS Shell, but is left to the Programmer.
[SEE-ALSO]
WHelpKeyProc
WControlKeyProc
WSubmitHelpProc
WSubmitDefKeys
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Procedure WSubmitHelpProc( Proc : POINTER );
[PARAMETERS]
Proc Far Pointer to Submitted Help Procedure
[RETURNS]
(None)
[DESCRIPTION]
This routine allows the caller to provide his own Help System for use
by the Window Library. He simply submits a pointer to his Help Procedure
(as a FAR Pointer) and any time a request is made to the Help System,
this submitted procedure will be called.
[SEE-ALSO]
WHelpKeyProc
WControlKeyProc
WSubmitHelpProc
WSubmitDefKeys
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Procedure WTurnHelpOnOff( TurnHelpOn : BOOLEAN );
[PARAMETERS]
TurnHelpOn Enable Help Procedure?
[RETURNS]
(None)
[DESCRIPTION]
Enables or Disables the Help Procedure Call (F1).
[SEE-ALSO]
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Procedure WBarAmountDone( Todo : LONGINT;
Done : LONGINT;
ChA : CHAR;
ChB : CHAR;
DoneFC : BYTE;
DoneBC : BYTE;
NotDoneFC : BYTE;
NotDoneBC : BYTE;
BarW : BYTE );
[PARAMETERS]
Todo Total Value of Item
Done Value Completed of Item
ChA Character Representing Not Done Portion of Bar
ChB Character Representing Done Portion of Bar
DoneFC Foreground Color of Done Bar Portion
DoneBC Background Color of Done Bar Portion
NotDoneFC Foreground Color of Not Done Bar Portion
NotDoneBC Background Color of Not Done Bar Portion
BarW Number of Chars in Bar Length
[RETURNS]
(None)
[DESCRIPTION]
This routine displays a Bar at the Current Cursor position. The Bar
indicates visually the amount of a Value is covered by the amount that
is Done. The Characters and Colors to represent this in are as provided.
[SEE-ALSO]
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Procedure WWriteXBoxRadioB( X : INTEGER;
Y : INTEGER;
FC : INTEGER;
BC : INTEGER;
CurSetting : BOOLEAN;
ZType : BYTE );
[PARAMETERS]
X X Window Coordinate
Y Y Window Coordinate
FC Foreground Check Box Radio Button Color
BC Background Check Box Radio Button Color
CurSetting Is this Radio Button Already Set?
ZType Check Box Radio Button Type
[RETURNS]
(None)
[DESCRIPTION]
This routine displays a Check Box Radio Button at the using the
provided Color and Position data. If the Setting is already set,
then the Radio Button is drawn as set. Check Box Radio Button Types
are as follows:
[SEE-ALSO]
WWriteTxt
WWriteNum
WWriteHex
WWriteTxtMask
WWriteNumMask
WWriteFloat
WWriteDateMask
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Function DoRead_Xbox_RadioB( X : INTEGER;
Y : INTEGER;
FC : INTEGER;
BC : INTEGER;
CurSetting : BOOLEAN;
ZType : BYTE ) : BOOLEAN;
[PARAMETERS]
X Check Box X Coordinate
Y Check Box Y Coordinate
FC Foreground Color
BC Background Color
CurSetting Current Setting (TRUE=Set, FALSE=Not Set)
ZType Check Box Type
[RETURNS]
Has this Check Box / Radio Button Been Checked?
[DESCRIPTION]
This procedure reads a Window Library Check Box / Radio Button. It is
mainly used as a Lower-Level routine tothe higher ones used in the
VForm Unit.
[SEE-ALSO]
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Function WReadXBox( X : INTEGER;
Y : INTEGER;
FC : INTEGER;
BC : INTEGER;
CurSetting : BOOLEAN ) : BOOLEAN;
[PARAMETERS]
X X Window Coordinate
Y Y Window Coordinate
FC Foreground Check Box Radio Button Color
BC Background Check Box Radio Button Color
CurSetting Is this Check Box Radio Button Already Set?
[RETURNS]
The Setting Status of the Radio Button after use.
[DESCRIPTION]
This function displays the Check Box Radio Button using the provided
initial Information. It then allows the user to modify the Button
settings and returns the latest Check Box Radio Button Setting.
[SEE-ALSO]
WReadTxt
WReadNum
WReadOpt
WReadHex
WReadTxtMask
WReadNumMask
WReadFloat
WReadDateMask
WReadXBox
WReadRadioB
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Function WReadRadioB( X : INTEGER;
Y : INTEGER;
FC : INTEGER;
BC : INTEGER;
CurSetting : BOOLEAN ) : BOOLEAN;
[PARAMETERS]
X X Window Coordinate
Y Y Window Coordinate
FC Foreground Radio Button Color
BC Background Radio Button Color
CurSetting Is this Radio Button Already Set?
[RETURNS]
The Setting Stats of the Radio Button after use.
[DESCRIPTION]
This function displays the Radio Button using the provided initial
information. It then allows the user to modify the Button setting
and returns the latest Radio Button Setting.
[SEE-ALSO]
WReadTxt
WReadNum
WReadOpt
WReadHex
WReadTxtMask
WReadNumMask
WReadFloat
WReadDateMask
WReadXBox
WReadRadioB
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Function WReadTxt( MaxLen : INTEGER;
FC : BYTE;
BC : BYTE;
InText : STRING ) : STRING;
[PARAMETERS]
MaxLen Width of String Edit Field
FC Foreground Color of Edit Field
BC Background Color of Edit Field
InText Default String to Display and Edit
[RETURNS]
The User-Entered Text String
[DESCRIPTION]
This routine writes a Text string at the current Cursor position and
padding the field using the provided Colors. It then allows the user
to use the default string or directly enter the desired Text until
ENTER or ESC is pressed. If ESC is pressed, then the string returned
is Char #27, otherwise it is whatever was last in the input field.
[SEE-ALSO]
WReadTxt
WReadNum
WReadOpt
WReadHex
WReadTxtMask
WReadNumMask
WReadFloat
WReadDateMask
WReadXBox
WReadRadioB
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Procedure WWriteTxt( MaxLen : INTEGER;
FC : BYTE;
BC : BYTE;
Txt : ST80 );
[PARAMETERS]
MaxLen Width of Display Color Field
FC Foreground Color for Field
BC Background Color for Field
Txt String to Display
[RETURNS]
(None)
[DESCRIPTION]
Writes a string at the current Cursor position using the provided
Colors, padding the Left Justified Text to the entire width of this
field with these colors.
[SEE-ALSO]
WWriteTxt
WWriteNum
WWriteHex
WWriteTxtMask
WWriteNumMask
WWriteFloat
WWriteDateMask
WWriteXBoxRadioB
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Procedure WWriteNum( MaxLen : INTEGER;
FC : BYTE;
BC : BYTE;
Num : LONGINT );
[PARAMETERS]
MaxLen Width of Display Color Field
FC Foreground Color for Field
BC Background Color for Field
Num Number to Display
[RETURNS]
(None)
[DESCRIPTION]
Writes a Number at the current Cursor position using the provided
Colors, padding the Left Justified Number to the entire width of
this field with these colors.
[SEE-ALSO]
WWriteTxt
WWriteNum
WWriteHex
WWriteTxtMask
WWriteNumMask
WWriteFloat
WWriteDateMask
WWriteXBoxRadioB
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
[PARAMETERS]
[RETURNS]
[DESCRIPTION]
[SEE-ALSO]
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Procedure WWriteFloat( Float : REAL;
Width : INTEGER;
Decimal : INTEGER;
FC : INTEGER;
BC : INTEGER );
[PARAMETERS]
Float Source Floating Point Number to Display
Width Total Display Width
Decimal Number of Digits below Decimal point.
FC Foreground Color for Field
BC Background Color for Field
[RETURNS]
(None)
[DESCRIPTION]
Writes a Floating Point number at the current Cursor position using
the provided Colors. If the whole Integer value is Zero, this is
used preceeding the Decimal point. All fractional digits are alway
displayed with either a valid Digit or Zero char.
[SEE-ALSO]
WWriteTxt
WWriteNum
WWriteHex
WWriteTxtMask
WWriteNumMask
WWriteFloat
WWriteDateMask
WWriteXBoxRadioB
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
[PARAMETERS]
[RETURNS]
[DESCRIPTION]
[SEE-ALSO]
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
[PARAMETERS]
[RETURNS]
[DESCRIPTION]
[SEE-ALSO]
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Procedure WWriteTxtMask( Mask : STRING;
Fill : CHAR;
LJust : BOOLEAN;
FC : INTEGER;
BC : INTEGER;
Txt : STRING );
[PARAMETERS]
Mask String denoting Display output Format
Fill Character to display when none are present for field
LJust Is the data displayed Left Justified in Field
FC Foreground Color for Field
BC Background Color for Field
Txt String to Display in the Mask Format
[RETURNS]
(None)
[DESCRIPTION]
Mask is a string indicating how to display the output String. Field
characters of "#" in the Mask represent the use of the next available
char in the Source String. All other characters in the Mask will be
output as they are in Mask. (IE. Mask="#,##-##/##" Txt"ABCDEFG", the
output would become "A,BC-DE/FG") This Mask is read using the Source
String until the length of Mask has been displayed. Where the source
string is shorter than the number of Mask Field Elements, the Fill
character is used instead. If LJust is FALSE, then the Fill is in
front of the Text, otherwise is padded on the End. Output string
starts from the current Cursor position.
[SEE-ALSO]
WWriteTxt
WWriteNum
WWriteHex
WWriteTxtMask
WWriteNumMask
WWriteFloat
WWriteDateMask
WWriteXBoxRadioB
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Procedure WWriteNumMask( Mask : STRING;
FC : INTEGER;
BC : INTEGER;
Num : LONGINT );
[PARAMETERS]
Mask String denoting Display output Format
FC Foreground Color for Field
BC Background Color for Field
Num Number to Display in the Mask Format
[RETURNS]
(None)
[DESCRIPTION]
Mask is a string indicating how to display the output Number. Field
characters of "#" in the Mask represent the use of the next available
digit in the Source Number. All other character in the Mask will
be output as they are in Mask. (IE. Mask="#,##-##/##" Num=1234567, the
output would become "1,23-45/67") This Mask is read using the Source
Number until the length of Mask has been displayed. Where the number
of digits in the Source Number is less thant the number of Mask Field
Elements, the character "0" is used (padded in the front of the number).
Output string starts from the current Cursor position.
[SEE-ALSO]
WWriteTxt
WWriteNum
WWriteHex
WWriteTxtMask
WWriteNumMask
WWriteFloat
WWriteDateMask
WWriteXBoxRadioB
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Procedure WWriteDateMask( FC : INTEGER;
BC : INTEGER;
Date : LONGINT );
[PARAMETERS]
FC Foreground Color for Field
BC Background Color for Field
Date Date in Coded Decimal Format (IE. 123456=12/34/56)
[RETURNS]
(None)
[DESCRIPTION]
Displays the Date at the current Cursor position using the provided
colors. Date uses a Coded Decimal Format (IE 123091=12/30/91).
[SEE-ALSO]
WWriteTxt
WWriteNum
WWriteHex
WWriteTxtMask
WWriteNumMask
WWriteFloat
WWriteDateMask
WWriteXBoxRadioB
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Function WReadNum( MaxLen : INTEGER;
FC : BYTE;
BC : BYTE;
InNum : LONGINT ) : LONGINT;
[PARAMETERS]
MaxLen Width of Number Edit Color Field
FC Foreground Color for Edit Field
BC Background Color for Edit Field
Num Default Number to Display and Edit
[RETURNS]
The User-Entered Number
[DESCRIPTION]
This routine writes a number at the current Cursor position and
padding the field using the provided Colors. It then allows the
user to use the default number or directly enter the desired number
until ENTER or ESC is pressed. If ESC is pressed, then the number
returned is -1, otherwise it is whatever was last in the input field.
[SEE-ALSO]
WReadTxt
WReadNum
WReadOpt
WReadHex
WReadTxtMask
WReadNumMask
WReadFloat
WReadDateMask
WReadXBox
WReadRadioB
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Procedure WWriteOpt( CurOpt : integer;
thelist : PMenuMax;
fc : byte;
bc : BYTE );
[PARAMETERS]
CurOpt
TheList
FC
BC
[RETURNS]
(None)
[DESCRIPTION]
[SEE-ALSO]
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Procedure WReadOpt( var CurOpt : INTEGER;
var TheList;
NumOpts : INTEGER;
FC : BYTE;
BC : BYTE );
[PARAMETERS]
CurOpt VAR Current/Last Selected Menu Item
TheList VAR Pointer to Generic Menu List
NumOpts Number of Items in Menu
FC Foreground Color for Menu
BC Background Color for Menu
[RETURNS]
(None)
[DESCRIPTION]
This routine displays a Menu field at the current Cursor position
with the provided Colors. The user may scroll thru the Menu though
only a single Item of the Menu is displayed. However if the user
pressed the Space Bar, a Drop-Down Menu is displayed at the current
cursor position with the current Menu Item being at the top. Depressing
the Space Bar toggles the Menu to again become a single-line Display.
This continues until the user has pressed ENTER or ESC. If ESC is
pressed, then the number returned as the CurOpt is -1, otherwise it
is whatever was the last selected Menu Item.
[SEE-ALSO]
WReadTxt
WReadNum
WReadOpt
WReadHex
WReadTxtMask
WReadNumMask
WReadFloat
WReadDateMask
WReadXBox
WReadRadioB
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Function WReadHex( Bites : INTEGER;
FC : INTEGER;
BC : INTEGER;
InHex : LONGINT ) : LONGINT;
[PARAMETERS]
Bites Number of HexBytes of Edit Field
FC Foreground Color for Edit Field
BC Background Color for Edit Field
InHex Default Value to Display (in Hex) and Edit
[RETURNS]
The User-Entered Value
[DESCRIPTION]
This routine writes a number in Hexadecimal at the current Cursor
position with the whole field being the provided Colors. It then
allows the user to use the default number or directly enter the
desired number until ENTER or ESC is pressed. If ESC is pressed,
then the number returned is 0, otherwise it is whatever was last
in the input field.
[SEE-ALSO]
WReadTxt
WReadNum
WReadOpt
WReadHex
WReadTxtMask
WReadNumMask
WReadFloat
WReadDateMask
WReadXBox
WReadRadioB
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Function WReadTxtMask( Mask : STRING;
Keys : STRING;
Fill : CHAR;
LJust : BOOLEAN;
FC : INTEGER;
BC : INTEGER;
InText : STRING ) : STRING;
[PARAMETERS]
Mask String denoting Display output Format
Fill Character to display when none are present for field
LJust Is the data displayed Left Justified in Field
FC Foreground Color for Field
BC Background Color for Field
InText Default String to Display and Edit
[RETURNS]
The User-Entered Text String
[DESCRIPTION]
This routine writes a string using the provided Text Mask at the
current Cursor position with the field being the provided Colors.
The Mask being a string representing indicating not only how to
display the output text but also which field elements are editable.
Field characters of "#" in the Mask represent the use of the next
available char in the Source String. These are also the only
elements which may be edited by this routine. All other characters
in the Mask will be output as they are in the Mask. (IE. Mask=
"#,##-##/##" InText="ABCDEFG", the output would become "A,BC-DE/FG"
with -in this case- the only editable characters being the letters
A thru G) Where the InText String is shorter that the number of
editable field elements, the Fill character will be displayed and
the string will be padded according to the Justification method
indicated (Left or Right). Key input is also filtered in this
routine to just those contained in the Keys string. None others
are allowed. The user is allowed to select the Default String or
edit directly his own string until ENTER or ESC is pressed. If ESC
is pressed, then the String is returned as the Character #27,
otherwise it is whatever was last in the input field, taking into
consideration that the Fill character is always stripped from the
result.
[SEE-ALSO]
WReadTxt
WReadNum
WReadOpt
WReadHex
WReadTxtMask
WReadNumMask
WReadFloat
WReadDateMask
WReadXBox
WReadRadioB
[EXAMPLE]
VAR
Txt : STRING;
BEGIN
WNew( -20,-5,-20,-10, WHITE,CYAN,WHITE,CYAN,'Window' );
WriteLn;
WriteLn( ' Enter a Text ' );
Txt := WReadTxtMask( '###-###-####',cALPHA,' ',TRUE,WHITE,BLUE,'Default' );
WriteLn;
WriteLn( 'Result : ', Num );
WMessage( 'Press any Key to Quit', WHITE, CYAN );
While NOT WKeyPressed Do;
WDispose( 'Window' );
END;
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Function WReadNumMask( Mask : STRING;
FC : INTEGER;
BC : INTEGER;
InNum : LONGINT ) : LONGINT;
[PARAMETERS]
Mask String denoting Display output Format
FC Foreground Color for Field
BC Background Color for Field
InNum Default Number to Display and Edit
[RETURNS]
The User-Entered Number
[DESCRIPTION]
This routine writes a Number using the provided Text Mask at the
current Cursor position with the field being the provided Colors.
The Mask being a string representing indicating not only how to
display the output text but also which field elements are editable.
Field characters of "#" in the Mask represent the use of the next
available digit in the Source Number. These are also the only
elements which may be edited by this routine. All other characters
in the Mask will be output as they are in the Mask. (IE. Mask=
"#,##-##/##" InNum="1234567", the output would become "1,23-45/67"
with -in this case- the only editable characters being the numbers
1 thru 7) Where the InText String is shorter that the number of
editable field elements, the Fill character will be displayed and
the string will be padded according to the Justification method
indicated (Left or Right). Key input is also filtered in as only
digits. None others are allowed. The user is allowed to select
the Default String or edit directly his own string until ENTER or
ESC is pressed. If ESC is pressed, then the String is returned as
the number -1, otherwise it is whatever was last in the input field,
taking into consideration that leading Zeros are always stripped from
the result.
[SEE-ALSO]
WReadTxt
WReadNum
WReadOpt
WReadHex
WReadTxtMask
WReadNumMask
WReadFloat
WReadDateMask
WReadXBox
WReadRadioB
[EXAMPLE]
VAR
Num : LONGINT;
BEGIN
WNew( -20,-5,-20,-10, WHITE,CYAN,WHITE,CYAN,'Window' );
WriteLn;
WriteLn( ' Enter a Number ' );
Num := WReadNumMask( '(###) ###-####',WHITE,BLUE, 1234567 );
WriteLn;
WriteLn( 'Result : ', Num );
WMessage( 'Press any Key to Quit', WHITE, CYAN );
While NOT WKeyPressed Do;
WDispose( 'Window' );
END;
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Function WReadDateMask( FC : INTEGER;
BC : INTEGER;
InDate : LONGINT ) : LONGINT;
[PARAMETERS]
FC Foreground Color for Edit Field
BC Background Color for Edit Field
Date Default Date in Coded Decimal Format (IE. 123456=12/34/56)
[RETURNS]
The User-Entered Date in Coded Decimal Format
[DESCRIPTION]
This routine writes a Date Value using a Date Edit Field Mask
("##/##/##") at the current Cursor position with the field being
the provided Colors. The InDate number is converted from the a
Coded Decimal Format to the Numeric Format for Entry (123091 =
"12/30/91") The character "#" in the Mask represents the only
editable field numbers. The user may select the default data or
directly enter the desired date until ENTER of ESC is pressed. If
ESC is pressed, then the number returned by this function is -1,
otherwise it is the selected data value reconvered into the
Coded Decimal Format.
[SEE-ALSO]
WReadTxt
WReadNum
WReadOpt
WReadHex
WReadTxtMask
WReadNumMask
WReadFloat
WReadDateMask
WReadXBox
WReadRadioB
[EXAMPLE]
Uses VDates,VWinHigh;
VAR
Date : TDate;
BEGIN
WNew( -20,-5,-20,-10, WHITE,CYAN,WHITE,CYAN,'Window' );
WriteLn;
WriteLn( ' Enter a Date ' );
Date := WReadDateMask( WHITE,BLUE, CurrDate );
WriteLn;
WriteLn( DateToStr( Date ) );
WMessage( 'Press any Key to Quit', WHITE, CYAN );
While NOT WKeyPressed Do;
WDispose( 'Window' );
END;
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Function WReadFloat( Width : INTEGER;
Decimal : INTEGER;
FC : INTEGER;
BC : INTEGER;
InFloat : REAL ) : REAL;
[PARAMETERS]
Width Total Display Width
Decimal Number of Digits below Decimal point.
FC Foreground Color for Edit Field
BC Background Color for Edit Field
InFloat Default Floating Point Number to Display and Edit
[RETURNS]
(None)
[DESCRIPTION]
This routine writes a floating point number at the current Cursor
position of the given width and number of decimal location, and
uses the provided Colors for the Edit field. It then allows the
user to use the default number or directly enter the desired number
until ENTER or ESC is pressed. If ESC is pressed, then the number
returned is -1.0, otherwise it is whatever was last in the input
field.
[SEE-ALSO]
WReadTxt
WReadNum
WReadOpt
WReadHex
WReadTxtMask
WReadNumMask
WReadFloat
WReadDateMask
WReadXBox
WReadRadioB
[EXAMPLE]
VAR
R : REAL;
BEGIN
WNew( -20,-5,-20,-10, WHITE,CYAN,WHITE,CYAN,'Window' );
WriteLn;
WriteLn( ' Enter a Floating Point Value ' );
R := -125.25;
R := WReadFloat( 9, 4, WHITE,BLUE,R );
WriteLn;
WriteLn( 'Result : ',R:9:4 );
WMessage( 'Press any Key to Quit', WHITE, CYAN );
While NOT WKeyPressed Do;
WDispose( 'Window' );
END;
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Procedure WView( P : Pointer;
BufWid : INTEGER;
BufLen : INTEGER;
Wid : INTEGER;
Len : INTEGER );
[PARAMETERS]
P Pointer to Data Buffer to View
BufWid Byte Width of Each Item in the Data Buffer
BufLen Number of Items in the Data Buffer
Wid Display Width of View
Len Display Length of View (Number of Items to Display)
[RETURNS]
(None)
[DESCRIPTION]
This routine displays a Scrollable Buffer of Data in a ViewPort type
Display. The Displayed Data is limited to the portion that is within
the bounds of the Display Port, and User Scrollable to view portions
outside this area. This routine can be used like a Menu except that
there is no returning data taken from the User other than that he is
finished Viewing the Data contained. This routine requires that that
caller provide a Window, as it does NOT created one.
[SEE-ALSO]
WDrawMenu
WMenu
WMenuB
WAutoMenu
WAutoMenu_Kill
WView
[EXAMPLE]
VAR
Line : ARRAY[1..10] of STRING[60];
BEGIN
Line[ 1] := 'Program TestThis;';
Line[ 2] := 'Uses CRT;';
Line[ 3] := '';
Line[ 4] := 'VAR';
Line[ 5] := ' I : INTEGER;';
Line[ 6] := '';
Line[ 7] := 'BEGIN';
Line[ 8] := ' For i := 1 to 1000 Do';
Line[ 9] := ' WriteLn( i : 3 );
Line[10] := 'END.';
P := Addr( Line );
WMessage( 'Use Arrow Keys to Scroll|<ESC> to Quit', WHITE,CYAN );
WNew( 10,5,40,10, WHITE,CYAN,WHITE,CYAN, 'Pascal Program' );
WView( Addr( Line ), Sizeof( Line[1]), 10, 30, 5 );
WDispose( 'Pascal Program' );
END;
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Procedure WCWrite( S : ST80 );
[PARAMETERS]
S String to Center and Display
[RETURNS]
(None)
[DESCRIPTION]
This routine Centers and Writes the given String in the current Window
on the current Line. Cursor is Right Border of the Window on the same
Line.
[SEE-ALSO]
WCWrite
WCWriteLn
WLineMsg
WPrgNameMsg
WMessage
WInfoMsg
WHorizLine
WVertLine
[EXAMPLE]
BEGIN
WNew( 5,2,40,15, WHITE,CYAN,WHITE,CYAN, 'Window' );
WriteLn;
WriteLn;
WCWrite( 'This is a Centered String' );
While NOT WKeyPressed Do;
WDispose( 'Window' );
END;
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Procedure WCWriteLn( S : ST80 );
[PARAMETERS]
S String to Center and Diplay
[RETURNS]
(None)
[DESCRIPTION]
This routine Centers and Writes the given String in the current Window
on the current Line. The Cursor is then moved to the Next Line down on
the Left Border of the current Window. If the Line written to was the
last Line in the Window, this causes the Text within the Window to scroll
up by one line.
[SEE-ALSO]
WCWrite
WCWriteLn
WLineMsg
WPrgNameMsg
WMessage
WInfoMsg
WHorizLine
WVertLine
[EXAMPLE]
BEGIN
WNew( 5,2,50,15, WHITE,CYAN,WHITE,CYAN, 'Window' );
WriteLn;
WCWriteLn( 'This is a Centered String' );
WriteLn;
WCWriteLn( 'However instead of Writing just one line' );
WCWriteLn( 'with NO Carriage Return' );
WCWriteLn( 'This Routine Allows you to keep on Writing' );
WCWriteLn( 'as much as you have space for.' );
WriteLn;
WCWriteLn( 'But I wouldn''t use this on the last Line' );
WCWriteLn( 'of the Window!' );
While NOT WKeyPressed Do;
WDispose( 'Window' );
END;
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Procedure FindInvisibleButtons( var B : TButtonList4;
var Count : BYTE;
PlusX : BYTE;
Y : BYTE;
S : ST80 );
[PARAMETERS]
B VAR Pointer to Modified Button List
Count VAR Modified Number of Buttons in List
PlusX Screen Offset from Edge (mainly for Windowed Text)
Y Screen Line Number where this String will Reside
S String to Parse for Buttons
[RETURNS]
Function : None
(VAR : [B] Pointer to Modified Button List)
(VAR : [Count] Modified Number of Buttons in List)
[DESCRIPTION]
Reads a Text String and Extracts any "Buttons" Located within the String.
These are Considered "Invisible" Buttons.
Some Mouse Buttons may be "Invisible" Buttons such as text contained upon
a message or other text status line. A button isn't actually drawn there
as the text is sufficient, however this does not change the fact that the
area is an Active Button.
When This function is called, the current Mouse coordinates are checked
with button list to determine if ANY Button is below it. If it happens
to be an "Invisible" Button, the Text below it is compared with one of
the Invisible Button Text to determine what function is being referenced.
Invisible Button Text must be one of the Following:
"<ESC>"
"<SPACE>"
"<ENTER>"
"<Fx>" (Where X is a Number from 1 to Max Function Key Nbr)
(ie. "<F10>")
[SEE-ALSO]
CheckInvisibleButtons
[EXAMPLE]
VAR
BL : TButtonList4;
Count : BYTE;
BEGIN
Count := 0;
Inc( Count );
MakeBRec( Addr( BL[Count] ), 2, 4,5, 'OK' );
S := 'Press <F1> for Help, <ENTER>=Continue, <ESC>=Quit';
Line := 25; { Last Line of Screen - Where this String will be }
FindInvisibleButtons( BL, Count, 1, Line, S );
WriteLn( 'There are Now ',Count,' Buttons' );
END;
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Procedure WLineMsg( S : STRING;
FC : BYTE;
BC : BYTE;
Y : BYTE;
var B : TButtonList4;
var Count : BYTE );
[PARAMETERS]
S Message Line Text
FC Foreground Color
BC Background Color
Y Y Window Coordinate for Message Line
V VAR Returned Button List Data
Count VAR Returned Number of Buttons in List
[RETURNS]
(None)
[DESCRIPTION]
[SEE-ALSO]
WCWrite
WCWriteLn
WLineMsg
WPrgNameMsg
WMessage
WInfoMsg
WHorizLine
WVertLine
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Procedure WPrgNameMsg( S : STRING;
FC : BYTE;
BC : BYTE );
[PARAMETERS]
S String to Display on the Program Name Message Line
FC Foreground Color of Program Name Message Line
BC Background Color of Program Name Message Line
[RETURNS]
(None)
[DESCRIPTION]
This routine writes the provided Text onto the Program Name Message
Line (the Top Line of the Screen). Text is Left Justified, however
if the caller wished to have part of the text Right Justified, he
need only add a Vertical Bar character ("|") with the Right Justified
text following it. The Entire line is colored using the provided
Colors. To Blank the Entire line, pass in one or more space
characters. To Remove the line completely from the Screen, pass in
an Empty String.
[SEE-ALSO]
WCWrite
WCWriteLn
WLineMsg
WPrgNameMsg
WMessage
WInfoMsg
WHorizLine
WVertLine
[EXAMPLE]
BEGIN
WOpen('▒',BLACK,BLUE,'CLOCK');
WPrgNameMsg('This is the WPrgNameMsg Line. TEST Ver 1.0',WHITE,CYAN );
WInfoMsgName('This is the WInfoMsg Line. Keep him informed of all the Events', WHITE,BLUE );
WMessage( 'This is the WMessage Line. Prompt User Here.|Press any Key to Quit',WHITE,CYAN );
While NOT WKeyPressed Do;
WClose;
END;
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Procedure WMessage( S : STRING;
FC : BYTE;
BC : BYTE );
[PARAMETERS]
S String to Display on the Message Line
FC Foreground Color of Message Line
BC Background Color of Message Line
[RETURNS]
(None)
[DESCRIPTION]
This routine writes the provided Text onto the Message Line (the Last
Line of the Screen -line 25 in 25 line mode). Text is Left Justified,
however if the caller wished to have part of the text Right Justified,
he need only add a Vertical Bar character ("|") with the Right Justified
text following it. The Entire line is colored using the provided Colors.
To Blank the Entire line, pass in one or more space characters. To
Remove the line completely from the Screen, pass in an Empty String.
[SEE-ALSO]
WCWrite
WCWriteLn
WLineMsg
WPrgNameMsg
WMessage
WInfoMsg
WHorizLine
WVertLine
[EXAMPLE]
BEGIN
WOpen('▒',BLACK,BLUE,'CLOCK');
WPrgNameMsg('This is the WPrgNameMsg Line. TEST Ver 1.0',WHITE,CYAN );
WInfoMsgName('This is the WInfoMsg Line. Keep him informed of all the Events', WHITE,BLUE );
WMessage( 'This is the WMessage Line. Prompt User Here.|Press any Key to Quit',WHITE,CYAN );
While NOT WKeyPressed Do;
WClose;
END;
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Procedure WInfoMsg( S : STRING;
FC : BYTE;
BC : BYTE );
[PARAMETERS]
S String to Display on the Info Message Line
FC Foreground Color of Info Message Line
BC Background Color of Info Message Line
[RETURNS]
(None)
[DESCRIPTION]
This routine writes the provided Text onto the Info Message Line (the
Next to the Last Line of the Screen -line 24 in 25 line mode). Text
is Left Justified, however if the caller wished to have part of the
text Right Justified, he need only add a Vertical Bar character ("|")
with the Right Justified text following it. The Entire line is
colored using the provided Colors. To Blank the Entire line, pass in
one or more space characters. To Remove the line completely from the
Screen, pass in an Empty String.
[SEE-ALSO]
WCWrite
WCWriteLn
WLineMsg
WPrgNameMsg
WMessage
WInfoMsg
WHorizLine
WVertLine
[EXAMPLE]
BEGIN
WOpen('▒',BLACK,BLUE,'CLOCK');
WPrgNameMsg('This is the WPrgNameMsg Line. TEST Ver 1.0',WHITE,CYAN );
WInfoMsgName('This is the WInfoMsg Line. Keep him informed of all the Events', WHITE,BLUE );
WMessage( 'This is the WMessage Line. Prompt User Here.|Press any Key to Quit',WHITE,CYAN );
While NOT WKeyPressed Do;
WClose;
END;
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Procedure WPrompt( S : ST80;
FC : BYTE;
BC : BYTE );
[PARAMETERS]
S String to Display
FC Foreground Color of Line
BC Background Color of Line
[RETURNS]
(None)
[DESCRIPTION]
This routine writes the provided Text onto the Last Line of the Current
Window. The Entire line is colored using the provided Colors. To Blank
the Entire line, pass in one or more space characters. To Remove the
line completely from the Window, pass in an Empty String.
[SEE-ALSO]
[EXAMPLE]
BEGIN
WNew( 5, 2, 40, 7, WHITE,BLUE,WHITE,BLUE,'Window' );
WPrompt( 'Press any Key to Quit...', WHITE,RED );
While NOT WKeyPressed Do;
WDispose( 'Window' );
END;
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Function WGemDialogBox( S : STRING ) : INTEGER;
[PARAMETERS]
S GEM Dialog Box Data String
[RETURNS]
The User-Selected Dialog Button number
[DESCRIPTION]
This is Dialog Box is intended for use by applications which require
User Multiple Selection Responses as opposed to only the acknowledgement
of a message. This is where a logic fork requires the programmer to
ask the user to make a decision from a limited selection of courses.
The GEM Dialog Box Data String has three Parts (with a forth optional).
Each part is contained within Open and Close Bracket chars "[" and "]"
representing the beginning and end of that portion of the Data.
The first String Data Part is the Dialog Icon Number - a character from
"1" to "9". This represents the Icon Type to use for the Display. They
are as follows:
Icon #1 = " █ " Icon #2 = " ▄▀▀▀▄ "
" █ " " ▄▀ "
" █ " " █ "
" ▄ " " ▄ "
" ▀ " " "
Icon #3 = " ▄▄ Icon #4 = " ▄▄▄ "
" ▄▀ ▀▄ " " ▄▀ ▀▄ "
" █ STOP █ " " █ RIP █ "
" ▀▄ ▄▀ " " █ █ "
" ▀▀▀▀ " " ▀ ▀ "
Icon #5 = " ─────── " Icon #6 = " "
" ▀▀▀▀▀▀▀ " " Visionix "
" ███████ " " ░░▒▒▒▓▓▓ "
" C D P " " "
" " " "
The second String Data Part is the Message Text Data. It is basically
the Dialog Box Message with each line of text being separated by a
Vertical Bar character ("|"). The Dialog Box will automatically size
itself (within screen limitations) to compensate for differing text
line length. It does the same for the number of lines too.
The third String Data Part is the Dialog Button Data. It is the Button
Text with the number of buttons, like the Message Data, being separated
by Vertical Bars. The Buttons are automatically sized and place along
the bottom of the Dialog Box. The Button type is taken from the
previously defined Window Environment Button Type. See "WOpen" or "WSet"
for further descriptions.
The forth String Data Part is optional. It is the Button Hot-Key
Character Definition Data. This is essentially a short string with
each character being the Unique Hot-Key Character for the corresponding
sequential button. The character is entirely independent from the
Button Text. If however, the caller desired to establish the Escape
Character as a Hot-Key for a certain button, he could enter this by
using the string "\esc" (which would be interpreted as a single hot-key)
for the desired button. In this case, if the ESC key were ever pressed,
it would call the cooresponding sequential button and returns that
button number as the result.
An example GEM Dialog Box Data String would be:
"[2][There has been an Error.|Do you wish to Continue?][Yes|No]"
This would create a Dialog Box using the Question Mark Icon, and
having 2 lines of Text. There would also be 2 Buttons with the
"Yes" Button being the default. If pressed it would cause this
routined to return a value of 1. If "No" were pressed the returning
value would be 2.
If, however we added to the above string the additional data of "[YN]",
we would now be able to select the desired answer using the letters
"Y" for the "Yes" Button, or "N" for the "No" Button. To have the "No"
Button respond to the ESC key instead we would use "[Y\esc]".
When the Entire Dialog Box is Displayed, it waits for the User to
Select an Answer (using the Arrow Keys and ENTER, or Hot-Keys) and
returns the Selection in terms of the Button Number. The First Button
being One (1), the Second being Two (2), and so on. Escape is returned
as -1.
After the Selection is made, this routine removes the Dialog Box it
created and returns the display to what it was prior to the call.
[SEE-ALSO]
WGemDialogBox
WGemMsgBox
WDrawIcon
WDoDialogBox
WGetIconWidth
[EXAMPLE]
VAR
Z : INTEGER;
BEGIN
Z := WGemDialogBox( '[1][Error in Operation|'+
'Code '+ByteToHex( $FF )+'h|'+
'Select Action][Abort|Retry|Ignore|Fail][ARIF]' );
CASE Z OF
1 : WriteLn( 'User Aborted Action.' );
2 : WriteLn( 'User Wants to Retry Action.' );
3 : WriteLn( 'User Ignore Failure and Continue.' );
4 : WriteLn( 'User Wants to Accept Failure and Pass Along Error Code.' );
Else WriteLn( 'User ESCAPED. Must be Too Scared to Take Action!' );
END; { Case Z }
END;
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Procedure WDrawButton( Btype : INTEGER;
X : INTEGER;
Y : INTEGER;
FC : INTEGER;
BC : INTEGER;
Text : STRING );
[PARAMETERS]
Btype Button Type Number
X X Screen Coordinate
Y Y Screen Coordinate
FC Foreground Button Color
BC Background Button Color
Text Button Text
[RETURNS]
(None)
[DESCRIPTION]
This routine takes the provided Button Data and Displays the Buttons.
Button Types are as follows:
1 = Button 3 Lines Tall
Double Border Box
With No Shadow
2 = Button 1 Line Tall
No Border
With Large Shadow
3 = Button 1 Line Tall
No Border
With 1/2 Size Shadow
4 = Button 1 Line Tall
No Border
With Large Shadow
5 = Button 1 Line Tall
With Large Shadow
6 = Button 1 Line Tall
With Large Shadow
5, 6 :
BEGIN
WFastWrite( X, Y + 1, FC, BC, ' ' + Text );
WFastWrite( X + Length( Text ) + 1, Y + 1,
BLACK, WinEnv.CurBackColor, ' ' );
FillChar( S, Length( Text ) + 3, ' ' );
S[0] := Chr( Length( Text ) + 2 );
WFastWrite( X, Y + 2, BLACK, WinEnv.CurBackColor, S );
END; { Of Btype = 5 or 6 }
7 = Button 1 Line Tall
No Border
Button Text inside "<" & ">" characters
With Large Shadow,
8 = Button 3 Lines Tall
Uses Widget Remapped Fonts as Border
9 = Button 1 Line Tall
No Border
With Right Side Shadow
[SEE-ALSO]
WDrawButton
WBlinkButton
WDrawButtonList
WMakeBRec
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
Procedure WGemMsgBox( S : STRING );
[PARAMETERS]
S GEM Message Box Data String
[RETURNS]
The User-Selected Message Button number
[DESCRIPTION]
This is Message Box is intended for use by applications which require
only the Acknowledgement of a Message as opposed to a User Selection
Response.
The GEM Message Box Data String has three Parts. Each part is
contained within Open and Close Bracket chars "[" and "]" representing
the beginning and end of that portion of the Data.
The first String Data Part is the Message Box Icon Number - a character
from "1" to "9". This represents the Icon Type to use for the Display.
They are as follows:
Icon #1 = " █ " Icon #2 = " ▄▀▀▀▄ "
" █ " " ▄▀ "
" █ " " █ "
" ▄ " " ▄ "
" ▀ " " "
Icon #3 = " ▄▄ Icon #4 = " ▄▄▄ "
" ▄▀ ▀▄ " " ▄▀ ▀▄ "
" █ STOP █ " " █ RIP █ "
" ▀▄ ▄▀ " " █ █ "
" ▀▀▀▀ " " ▀ ▀ "
Icon #5 = " ─────── " Icon #6 = " "
" ▀▀▀▀▀▀▀ " " Visionix "
" ███████ " " ░░▒▒▒▓▓▓ "
" C D P " " "
" " " "
The second String Data Part is the Message Box Text Data. It is
basically the Dialog Box Message with each line of text being separated
by a Vertical Bar character ("|"). The Message Box will automatically
size itself (within screen limitations) to compensate for differing text
line length. It does the same for the number of lines too.
The third String Data Part is the Dialog Button Data. It is the Button
Text. Unlike the GEM Dialog Box, the Message Box allows for only One
Button Return by the User. The Button is automatically sized and placed
along the bottom of the Dialog Box. The Button type is taken from the
previously defined Window Environment Button Type. See "WOpen" or "WSet"
for further descriptions.
The forth String Data Part is optional. It is the Button Hot-Key
Character Definition Data. This is essentially a short string with
each character being the Unique Hot-Key Character for the corresponding
sequential button. The character is entirely independent from the
Button Text. If however, the caller desired to establish the Escape
Character as a Hot-Key for a certain button, he could enter this by
using the string "\esc" (which would be interpreted as a single hot-key)
for the desired button. In this case, if the ESC key were ever pressed,
it would call the cooresponding sequential button and returns that
button number as the result.
An example GEM Message Box Data String would be:
"[1][There has been an Error.|This Program Halting.][Ok]"
This would create a Message Box using the Exclamation Point Icon, and
having 2 lines of Text. There would also be 1 Button with the text
"Ok" on it. Any Key Press by the User will Activate the Button and Exit
the Routine.
After the Message is read and Acknowledged, this routine removes the
Message Box it created and returns the display to what it was prior to
the call.
[SEE-ALSO]
WGemDialogBox
WGemMsgBox
WDrawIcon
WDoDialogBox
WGetIconWidth
[EXAMPLE]
BEGIN
WGemMsgBox( '[1][Error in Operation||Code '+ByteToHex( $FF )+'h][OK]' );
END;
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Procedure WBlinkButton( BType : BYTE;
X : BYTE;
Y : BYTE;
FC1 : BYTE;
BC1 : BYTE;
FC2 : BYTE;
BC2 : BYTE;
Delay1 : WORD;
Delay2 : WORD;
BlinkCount : BYTE;
S : ST80 );
[PARAMETERS]
Btype Button Type Number
X X Screen Coordinate
Y Y Screen Coordinate
FC1 Foreground Button Color (Normal)
BC1 Background Button Color (Normal)
FC2 Foreground Button Color (Blink Color)
BC2 Background Button Color (Blink Color)
Delay1 Pause Time while Normal Colors
Delay2 Pause Time while Blink Colors
BlinkCount Number of Time to Cycle thru Norm-Blink Sequence
[RETURNS]
(None)
[DESCRIPTION]
This routine animates the Button Blinking using the provided Button
information. It is mainly used to draw attention to the selected
Button before the action is called.
Button Types are as follows:
1 = Button 3 Lines Tall
Double Border Box
With No Shadow
2 = Button 1 Line Tall
No Border
With Large Shadow
3 = Button 1 Line Tall
No Border
With 1/2 Size Shadow
4 = Button 1 Line Tall
No Border
With Large Shadow
5 = Button 1 Line Tall
With Large Shadow
6 = Button 1 Line Tall
With Large Shadow
5, 6 :
BEGIN
WFastWrite( X, Y + 1, FC, BC, ' ' + Text );
WFastWrite( X + Length( Text ) + 1, Y + 1,
BLACK, WinEnv.CurBackColor, ' ' );
FillChar( S, Length( Text ) + 3, ' ' );
S[0] := Chr( Length( Text ) + 2 );
WFastWrite( X, Y + 2, BLACK, WinEnv.CurBackColor, S );
END; { Of Btype = 5 or 6 }
7 = Button 1 Line Tall
No Border
Button Text inside "<" & ">" characters
With Large Shadow,
8 = Button 3 Lines Tall
Uses Widget Remapped Fonts as Border
9 = Button 1 Line Tall
No Border
With Right Side Shadow
[SEE-ALSO]
WDrawButton
WBlinkButton
WDrawButtonList
WMakeBRec
[EXAMPLE]
VAR
BR : TButton;
BEGIN
WMakeBRec( BR, 2, 4,5, WHITE,GREEN, 'OK' );
WDrawButtonList( Addr( BR ), 1 );
WBlinkButton( 2, 4,5, WHITE,GREEN, WHITE,WHITE, 50,50, 3, 'OK' );
END;
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Procedure WDrawButtonList( BList : PButtonList;
Count : BYTE );
[PARAMETERS]
BList Pointer to a List of Button Data
Count Number of Buttons in List
[RETURNS]
(None)
[DESCRIPTION]
This routine reads the Button List Data and displays each and every
Button up to the number of buttons in the List.
[SEE-ALSO]
WDrawButton
WBlinkButton
WDrawButtonList
WMakeBRec
[EXAMPLE]
VAR
BEGIN
END;
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Procedure WMakeBRec( var BRec : TButton;
BType : BYTE;
X : BYTE;
Y : BYTE;
FC : INTEGER;
BC : INTEGER;
Text : STRING );
[PARAMETERS]
BRec VAR Returned Button Data Record
BType Button Type Number
X X Screen Coordinate
Y Y Screen Coordinate
FC Foreground Button Color
BC Background Button Color
Text Button Text
[RETURNS]
Function : None
(VAR : [BRec] Button Data Record)
[DESCRIPTION]
This routine takes the provided Button Data and puts it all in a
single provided Button record. This is returned to the caller as
a VAR. The purpose was to simplify the creation of Button records.
Button Types are as follows:
1 = Button 3 Lines Tall
Double Border Box
With No Shadow
2 = Button 1 Line Tall
No Border
With Large Shadow
3 = Button 1 Line Tall
No Border
With 1/2 Size Shadow
4 = Button 1 Line Tall
No Border
With Large Shadow
5 = Button 1 Line Tall
With Large Shadow
6 = Button 1 Line Tall
With Large Shadow
5, 6 :
BEGIN
WFastWrite( X, Y + 1, FC, BC, ' ' + Text );
WFastWrite( X + Length( Text ) + 1, Y + 1,
BLACK, WinEnv.CurBackColor, ' ' );
FillChar( S, Length( Text ) + 3, ' ' );
S[0] := Chr( Length( Text ) + 2 );
WFastWrite( X, Y + 2, BLACK, WinEnv.CurBackColor, S );
END; { Of Btype = 5 or 6 }
7 = Button 1 Line Tall
No Border
Button Text inside "<" & ">" characters
With Large Shadow,
8 = Button 3 Lines Tall
Uses Widget Remapped Fonts as Border
9 = Button 1 Line Tall
No Border
With Right Side Shadow
[SEE-ALSO]
WDrawButton
WBlinkButton
WDrawButtonList
WMakeBRec
[EXAMPLE]
VAR
BR : TButton;
BEGIN
WMakeBRec( BR, 2, 4,5, WHITE,GREEN, 'OK' );
WDrawButtonList( Addr( BR ), 1 );
While NOT WKeyPressed Do;
END;
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Procedure WControlKeyProc( Status : Byte;
Key1 : CHAR;
Key2 : CHAR );
[PARAMETERS]
Status
Key1
Key2
[RETURNS]
(None)
[DESCRIPTION]
[SEE-ALSO]
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Procedure WHelpKeyProc( Status : BYTE;
Key1 : CHAR;
Key2 : CHAR );
[PARAMETERS]
Status
Keu1
Key2
[RETURNS]
(None)
[DESCRIPTION]
[SEE-ALSO]
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Procedure WOldHelp;
[PARAMETERS]
(None)
[RETURNS]
(None)
[DESCRIPTION]
This is the Original Help Routine of the Window Library.
What is would do is read a Text File and create a scrolling Window
in which would be the specific Help Text for the action being done.
The user would create a text file using the predefined format with
each help menu having an ID. Before calling the help function, the
programmer would set the ID for the item in question.
[SEE-ALSO]
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Function WGetLastOPROTsrPtr : Pointer;
[PARAMETERS]
(None)
[RETURNS]
Pointer to Last Object Professional TSR Pointer
[DESCRIPTION]
Returns the Pointer of the Previous Object Professional TSR Routine Ptr.
[SEE-ALSO]
[EXAMPLE]
Uses VGen,VWinHigh;
VAR
P : POINTER;
BEGIN
P := WGetLastOPROTsrPtr;
If P <> NIL Then
WriteLn( 'Prev TSR : ',PtrToHex( P ) )
Else
WriteLn( 'Prev TSR : NIL' );
END;
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Function WModulePtrByName( var ModuleName : STRING ) : WIfcPtr;
[PARAMETERS]
ModuleName VAR Returned Name of IfcRecord to Locate
[RETURNS]
Function : None
(VAR : [ModuleName] Name of IfcRecord to Locate)
[DESCRIPTION]
This procedure returns a pointer to the IfcRecord for the Module
named or NIL.
[SEE-ALSO]
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Procedure WHorizLine( Y : INTEGER;
LType : INTEGER );
[PARAMETERS]
Y Y Horizontal Position in Window
LType Line Type (1=Single, 2=Double)
[RETURNS]
(None)
[DESCRIPTION]
Draws a Horizontal Bar from Left to Right of the current window at
the given Y position.
[SEE-ALSO]
WVertLine
[EXAMPLE]
BEGIN
WNew( 5, 2, 20, 7, WHITE,CYAN,WHITE,CYAN,'Window' );
WVertLine( 5, 1 );
While NOT WKeyPressed Do;
WDispose( 'Window' );
END;
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Procedure WVertLine( X : INTEGER;
LType : INTEGER );
[PARAMETERS]
X X Vertical Position in Window
LType Line Type (1=Single, 2=Double)
[RETURNS]
(None)
[DESCRIPTION]
Draws a Vertical Bar from top to bottom of the current window at the
given X position.
[SEE-ALSO]
WhorizLine
[EXAMPLE]
BEGIN
WNew( 5, 2, 20, 7, WHITE,CYAN,WHITE,CYAN,'Window' );
WVertLine( 5, 1 );
While NOT WKeyPressed Do;
WDispose( 'Window' );
END;